package com.ctshk.rpc.order.train.req;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 填写火车票订单信息req
 * </p>
 *
 * @author 彭柳霖
 * @since 2021-03-16
 */
@Data
@ApiModel(value="TrainPlaceOrderReq对象", description="填写火车票订单信息req")
public class TrainPlaceOrderReq implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "请求来源, 默认1, C端传2")
    private int actionType = 1;

    @NotNull(message = "火车产品ID不能为空")
    @ApiModelProperty(value = "火车产品id")
    private Long trainProductId;

//    @NotEmpty(message = "票种名称不能为空")
    @ApiModelProperty(value = "票种名称")
    private String ticketTypeName;

//    @NotNull(message = "有效时间不能为空")
    @ApiModelProperty(value = "出发时间")
    private LocalDateTime effectiveTime;

    @NotNull(message = "购买数量不能为空")
    @ApiModelProperty(value = "购买数量")
    private Integer number;

    @NotNull(message = "是否代理不能为空，1:代理,0:非代理")
    @Max(value = 1,message = "是否代理不能为空，1:代理,0:非代理")
    @Min(value = 0,message = "是否代理不能为空，1:代理,0:非代理")
    @ApiModelProperty(value = "是否代理")
    private Integer isAgent;

    @ApiModelProperty(value = "代理公司id")
    private Long agencyId;

    @ApiModelProperty(value = "代理公司")
    private String agencyCompany;

    @ApiModelProperty(value = "代理人名称")
    private String agentUserName;

    @ApiModelProperty(value = "产品类型")
    private Integer productType;

    @ApiModelProperty(value = "来源")
    private Integer source;

    @ApiModelProperty(value = "销售人员id")
    private Long salesmanId;

    @ApiModelProperty(value = "销售人员名称")
    private String salesmanName;

    @NotBlank(message = "联系人姓不能为空")
    @ApiModelProperty(value = "联系人姓")
    private String surname;

    @NotBlank(message = "联系人名不能为空")
    @ApiModelProperty(value = "联系人名")
    private String name;

    @ApiModelProperty(value = "联系人姓名")
    private String contactName;

    @NotBlank(message = "联系人手机不能为空")
    @ApiModelProperty(value = "联系人手机")
    private String contactMobile;

    @ApiModelProperty(value = "联系人手机区号id")
    private Long contactMobileAreaCodeId;

    @ApiModelProperty(value = "联系人手机区号")
    private String contactMobileAreaCode;

    @ApiModelProperty(value = "联系人邮箱")
    private String contactEmail;

    @ApiModelProperty(value = "实际存放查询后返回的会员手机号码")
    private String memberId;

    @ApiModelProperty(value = "使用积分")
    private Integer usingPoints;

    @ApiModelProperty(value = "优惠卷id")
    private Long couponId;

    @ApiModelProperty(value = "备注")
    private String remark;

    /*@NotNull(message = "性别不能为空，0：男,1:女")
    @Max(value = 1,message = "性别值域，0：男,1:女")
    @Min(value = 0,message = "性别值域，0：男,1:女")*/
    @ApiModelProperty(value = "性别")
    private Integer gender;

    @ApiModelProperty(value = "销售方式(1：单品销售 2：打包销售)")
    private Integer salesMethods;

    @ApiModelProperty(value = "客户类型；1：散客；2：代理；3；大客户；")
    private Integer clientType;

    @ApiModelProperty(value = "大客户ID")
    private Long bigClientId;

    @ApiModelProperty(value = "大客户名称")
    private String bigClientName;

    @Valid
    @NotEmpty(message = "旅客列表不能为空")
    @ApiModelProperty(value = "旅客列表")
    private List<TrainOrderTouristReq> trainOrderTouristReqList;

    @ApiModelProperty(value = "出发日期")
    @NotNull(message = "出发日期不能为空")
    private LocalDate effectiveDate;

}
